Helpful Information
Home
Categories
Contact us
Category: Mysql and PHP
Mysql and PHP >md5 + pasword<
I have done a php and mysql website on my local server and now I want to put it online
How encrypt my mysql password ?
I wana use MD5 fonction
Thank's a lot I am not very confident with
security questions I am only a webdesigner.
Welcome here.
There are two possibility's : use the MySQL md5() function or the php md5() function.
MySQL md5() will look like
$sql = "insert into clients (usern, userpwd, regdate) values ('" . $uname . "','md5(" . $upwd . ")', '". $datetime . "')";
more info
http://www.mysql.com/doc/en/Miscellaneous_functions.html
MySQL md5() will look like
$upwd = md5($upwd);
$sql = "insert into clients (usern, userpwd, regdate) values ('" . $uname . "','" . $upwd . "', '". $datetime . "')"
more info
http://be.php.net/md5
If you can, then use sha1() instead of md5()
privacy (GDPR)